package org.vm.cmbcdirect.component.dao.impl;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.vm.cmbcdirect.component.dao.FaceFacesetDao;
import org.vm.cmbcdirect.component.model.FaceFaceset;

/**
 * Created by violorch on 2016/03/25.
 */
public class FaceFacesetDaoImpl implements FaceFacesetDao {

    @Autowired
    private SqlSessionTemplate sqlSessionTemplate;

    public int deleteByPrimaryKey(String facefacesetId) {
        return sqlSessionTemplate.delete("facefaceset.deleteByPrimaryKey", facefacesetId);
    }

    public int insert(FaceFaceset record) {
        return sqlSessionTemplate.insert("facefaceset.insert", record);
    }

    public int insertSelective(FaceFaceset record) {
        return sqlSessionTemplate.insert("facefaceset.insertSelective", record);
    }

    public FaceFaceset selectByPrimaryKey(String facefacesetId) {
        return sqlSessionTemplate.selectOne("facefaceset.selectByPrimaryKey", facefacesetId);
    }

    public int updateByPrimaryKeySelective(FaceFaceset record) {
        return sqlSessionTemplate.update("facefaceset.updateByPrimaryKeySelective", record);
    }

    public int updateByPrimaryKey(FaceFaceset record) {
        return sqlSessionTemplate.update("facefaceset.updateByPrimaryKey", record);
    }
}
